package structure_结构性.flyweight_pattern_享元模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/07/14:17
 * @Description:
 */
public class FlyweightPatternDemo {
	public static void main(String[] args) {
		Shape red = ShapeFactory.getShape("red");
		red.draw();
		System.err.println(red);
		Shape red1 = ShapeFactory.getShape("red");
		System.err.println(red1);
		Shape green = ShapeFactory.getShape("green");
		System.err.println(green);
		System.err.println(green);
		green.draw();
	}
}
